var e = require;
var t = module;
var o = exports;
var n = o;
Object.defineProperty(n, "__esModule", {value: !0});
var i = e("GlobalParam"),
    a = e("Util"),
    r = (function () {
        function e() {
            (this.taskListName = []),
                (this.taskListScore = []),
                (this.rewardList = []),
                a.default.getItem("ProgressTaskTimer", "000") != a.default.getTodayStr() &&
                    (a.default.setItem("ProgressTaskTimer", a.default.getTodayStr()),
                    a.default.setItem("ProgressTaskScore", "0"),
                    a.default.setItem("ProgressTaskItem1", "0"),
                    a.default.setItem("ProgressTaskItem2", "0"),
                    a.default.setItem("ProgressTaskItem3", "0"),
                    a.default.setItem("ProgressTaskItem4", "0"),
                    a.default.setItem("ProgressTaskItem5", "0")),
                (this.rewardList = i.default.ProgressTaskData);
            for (var e = 0; e < this.rewardList.length; e++) {
                var t = this.rewardList[e];
                this.taskListName.push(t.chinese), this.taskListScore.push(t.score);
            }
        }
        return (
            Object.defineProperty(e, "instance", {
                get: function () {
                    return e._instance || (e._instance = new e()), e._instance;
                },
                enumerable: !1,
                configurable: !0
            }),
            (e.prototype.setScore = function (e) {
                var t = a.default.getItem("ProgressTaskScore", "0"),
                    o = Number(t);
                (o += e), a.default.setItem("ProgressTaskScore", o.toString());
            }),
            (e.prototype.getScore = function () {
                return Number(a.default.getItem("ProgressTaskScore", "0"));
            }),
            (e.prototype.getTaskProgressIndex = function () {
                for (var e = this.getScore(), t = this.taskListScore, o = 0, n = 0; n < t.length; n++)
                    e >= t[n] && (o = n + 1);
                return o;
            }),
            (e._instance = null),
            e
        );
    })();
n.default = r;
